fix this to be sane
authorHavoc Pennington <hp@redhat.com>
Mon, 4 Dec 2000 23:04:17 +0000 (23:04 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Mon, 4 Dec 2000 23:04:17 +0000 (23:04 +0000)
2000-12-04  Havoc Pennington  <hp@redhat.com>

* gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane

* gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler

* gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler

* gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
hack to avoid infinite loops (queue draw instead of draw) -
Owen has more appropriate fixes in a branch he'll check in later.

* gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
separator, CR, and CRLF as line ends

* gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
into lines using pango_find_paragraph_boundary(); other bits of
the widget are still going to be broken if the boundary isn't '\n'
though

20 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/gdk-pixbuf/tmpl/creating.sgml
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
docs/reference/gdk/tmpl/gdk-unused.sgml
docs/reference/gdk/tmpl/regions.sgml
gdk/gdkevents.h
gdk/gdktypes.h
gtk/gtkhpaned.c
gtk/gtknotebook.c
gtk/gtkpaned.c
gtk/gtktextbtree.c
gtk/gtktextiter.c
gtk/gtkvpaned.c

index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 23ee0d2a235d349133efc9b9fca697ace8abdad3..2f1f27ca364b1dfbffe335f9f2209369dd1865e0 100644 (file)
@@ -1,3 +1,23 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+       * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+       * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+       * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary 
+       hack to avoid infinite loops (queue draw instead of draw) - 
+       Owen has more appropriate fixes in a branch he'll check in later.
+
+       * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+       separator, CR, and CRLF as line ends
+
+       * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+       into lines using pango_find_paragraph_boundary(); other bits of
+       the widget are still going to be broken if the boundary isn't '\n'
+       though
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
index 0bbce5405a9051c6990701b10780d93c0ba5b556..b98b4024fa727e1aeef9cfe2427c9e003f413fa9 100644 (file)
@@ -94,19 +94,6 @@ Creating a pixbuf from image data that is already in memory.
 @Returns: 
 
 
-<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
-<para>
-
-</para>
-
-@src_pixbuf: 
-@src_x: 
-@src_y: 
-@width: 
-@height: 
-@Returns: 
-
-
 <!-- ##### FUNCTION gdk_pixbuf_copy ##### -->
 <para>
 
index b9cea2ff9f912b5c9b2c2c3db7e5acf995036955..8d5ba404d1b5238df1a5039fb31b740bed6a45f8 100644 (file)
@@ -130,3 +130,77 @@ Application-driven progressive image loading.
 @loader: 
 
 
+<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
+  <para>
+    This signal is emitted when a significant area of the image being
+    loaded has been updated.  Normally it means that a complete
+    scanline has been read in, but it could be a different area as
+    well.  Applications can use this signal to know when to repaint
+    areas of an image that is being loaded.
+  </para>
+
+@gdkpixbufloader: the object which received the signal.
+@arg1: 
+@arg2: 
+@arg3: 
+@arg4: 
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+@x: X offset of upper-left corner of the updated area.
+@y: Y offset of upper-left corner of the updated area.
+@width: Width of updated area.
+@height: Height of updated area.
+
+<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
+  <para>
+    This signal is emitted when the pixbuf loader has been fed the
+    initial amount of data that is required to figure out the size and
+    format of the image that it will create.  After this signal is
+    emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
+    fetch the partially-loaded pixbuf.
+  </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
+  <para>
+    This signal is emitted when a frame is done loading.  It will be
+    emitted for each frame in an animation data stream.
+  </para>
+
+@gdkpixbufloader: the object which received the signal.
+@arg1: 
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+@frame: Frame which just completed loading.
+
+<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
+  <para>
+    This signal is emitted when an animation is done loading.
+  </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
+  <para>
+    This signal is emitted when gdk_pixbuf_loader_close() is called.
+    It can be used by different parts of an application to receive
+    notification when an image loader is closed by the code that
+    drives it.
+  </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
+
index 152dfaf4ece40502642a70b52805a7a15eea5c55..e26790a569e63e9e40b9b7bc70548989ef758a37 100644 (file)
@@ -1,3 +1,7 @@
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
+Drawables to Pixbufs
+
+
 <!-- ##### USER_FUNCTION GdkPixbufLastUnref ##### -->
   <para>
     A function of this type can be used to override the default
 @pixbuf: The pixbuf that is losing its last reference.
 @data: User closure data.
 
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
-Drawables to Pixbufs
-
-
 <!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
 <para>
 
@@ -65,34 +65,6 @@ End:
   </para>
 
 
-<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
-  <para>
-    This signal is emitted when an animation is done loading.
-  </para>
-
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
-
-<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
-  <para>
-    This signal is emitted when a significant area of the image being
-    loaded has been updated.  Normally it means that a complete
-    scanline has been read in, but it could be a different area as
-    well.  Applications can use this signal to know when to repaint
-    areas of an image that is being loaded.
-  </para>
-
-@gdkpixbufloader: the object which received the signal.
-@arg1: 
-@arg2: 
-@arg3: 
-@arg4: 
-@loader: Loader which emitted the signal.
-@x: X offset of upper-left corner of the updated area.
-@y: Y offset of upper-left corner of the updated area.
-@width: Width of updated area.
-@height: Height of updated area.
-
 <!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
 <para>
 
@@ -150,17 +122,6 @@ End:
   </para>
 
 
-<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
-  <para>
-    This signal is emitted when a frame is done loading.  It will be
-    emitted for each frame in an animation data stream.
-  </para>
-
-@gdkpixbufloader: the object which received the signal.
-@arg1: 
-@loader: Loader which emitted the signal.
-@frame: Frame which just completed loading.
-
 <!-- ##### SECTION ./tmpl/xlib-init.sgml:Short_Description ##### -->
 Initializing the &gdk-pixbuf; Xlib library.
 
@@ -194,24 +155,6 @@ Initializing the &gdk-pixbuf; Xlib library.
   </para>
 
 
-<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
-  <para>
-    This signal is emitted when gdk_pixbuf_loader_close() is called.
-    It can be used by different parts of an application to receive
-    notification when an image loader is closed by the code that
-    drives it.
-  </para>
-
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
 <!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
   <para>
     Works in the same way as the <link
@@ -452,17 +395,17 @@ Rendering a pixbuf to a GDK drawable.
 Getting parts of an X drawable's image data into a pixbuf.
 
 
-<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
-  <para>
-    This signal is emitted when the pixbuf loader has been fed the
-    initial amount of data that is required to figure out the size and
-    format of the image that it will create.  After this signal is
-    emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
-    fetch the partially-loaded pixbuf.
-  </para>
+<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
+<para>
 
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
+</para>
+
+@src_pixbuf: 
+@src_x: 
+@src_y: 
+@width: 
+@height: 
+@Returns: 
 
 <!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Title ##### -->
 XlibRGB
@@ -484,18 +427,18 @@ XlibRGB
   </para>
 
 
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
-  <para>
-    gdk_image_get().
-  </para>
-
-
 <!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:See_Also ##### -->
 <para>
 
 </para>
 
 
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
+  <para>
+    gdk_image_get().
+  </para>
+
+
 <!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
 <para>
 
index f455390216a776a3d520ca54cdd827fd7f9cc001..f3f6612dbba236618ac154774a567a686d137036 100644 (file)
@@ -163,6 +163,15 @@ onto the predefined valuator types that GTK+ understands.
 @axes: an array of GdkAxisUse. This length of this array
        must match the number of axes for the device.
 
+<!-- ##### STRUCT GdkSpan ##### -->
+<para>
+
+</para>
+
+@x: 
+@y: 
+@width: 
+
 <!-- ##### FUNCTION gdk_input_set_source ##### -->
 <para>
 Sets the source type for a device.
@@ -171,6 +180,20 @@ Sets the source type for a device.
 @deviceid: the device to configure
 @source: the new source type.
 
+<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
+<para>
+Intersects a set of spans with a region and call a user specified
+function for each resulting spanline. This function is a lot more effective
+if the spans are sorted.
+</para>
+
+@region: The region to intersect against.
+@spans: Array of spans to intersect.
+@n_spans: Number of spans.
+@sorted: True if the spans are sorted in increasing y order.
+@function: The function to call for each intersected spanline.
+@data: Opaque user data passed to function.
+
 <!-- ##### SECTION ./tmpl/gdkregion.sgml:Title ##### -->
 Points, Rectangles and Regions
 
@@ -184,6 +207,14 @@ Returns the intersection of two regions.
 @source2: a #GdkRegion.
 @Returns: the intersection of @source1 and @source2.
 
+<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
+<para>
+
+</para>
+
+@span: The intersected part of the span.
+@data: Opaque data passed by user.
+
 <!-- ##### FUNCTION gdk_input_set_mode ##### -->
 <para>
 Enables or disables a device, and determines how the
index 88e3e2d62ebaf0c94d4bfbfe85143ebe13b56b5b..387544c82b6881300a12a8e5412778e8614b7c9b 100644 (file)
@@ -266,36 +266,3 @@ Returns the union of a region and a rectangle.
 @source2: 
 
 
-<!-- ##### STRUCT GdkSpan ##### -->
-<para>
-
-</para>
-
-@x: 
-@y: 
-@width: 
-
-<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
-<para>
-
-</para>
-
-@span: The intersected part of the span.
-@data: Opaque data passed by user.
-
-
-<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
-<para>
-Intersects a set of spans with a region and call a user specified
-function for each resulting spanline. This function is a lot more effective
-if the spans are sorted.
-</para>
-
-@region: The region to intersect against.
-@spans: Array of spans to intersect.
-@n_spans: Number of spans.
-@sorted: True if the spans are sorted in increasing y order.
-@function: The function to call for each intersected spanline.
-@data: Opaque user data passed to function.
-
-
index d671177346e9b67e781a2a0ff13afd56d91d374e..5813f894d539adf48b182449e4235a832771eed8 100644 (file)
@@ -279,6 +279,8 @@ struct _GdkEventKey
   guint keyval;
   gint length;
   gchar *string;
+  guint16 hardware_keycode;
+  guint8 keyboard_group;
 };
 
 struct _GdkEventCrossing
index cedf86dc6204304b92690c3de46dcaf5058706b6..53e0ca3e91f127684b0ae0ca83e58951d2df37a5 100644 (file)
@@ -64,6 +64,7 @@ extern "C" {
 
 /* Type definitions for the basic structures.
  */
+typedef struct _GdkKeyInfo            GdkKeyInfo;
 typedef struct _GdkPoint             GdkPoint;
 typedef struct _GdkRectangle         GdkRectangle;
 typedef struct _GdkSegment           GdkSegment;
@@ -163,6 +164,16 @@ typedef void (*GdkInputFunction) (gpointer     data,
 
 typedef void (*GdkDestroyNotify) (gpointer data);
 
+/* GdkKeyInfo is a description of a the hardware key and state that
+ * can be mapped to some keysym.
+ */
+struct _GdkKeyInfo
+{
+  guint keycode;
+  gint  group;
+  gint  level;
+};
+
 struct _GdkPoint
 {
   gint x;
index 32fa276ce3d1948b361a2496cd3bcd1634fcbb0a..d74ac1aa05f911a5089910aa0763cd1e03bb9913 100644 (file)
@@ -32,6 +32,8 @@ static void     gtk_hpaned_size_request   (GtkWidget      *widget,
                                           GtkRequisition *requisition);
 static void     gtk_hpaned_size_allocate  (GtkWidget      *widget,
                                           GtkAllocation  *allocation);
+static gint     gtk_hpaned_expose         (GtkWidget      *widget,
+                                           GdkEventExpose *event);
 static void     gtk_hpaned_xor_line       (GtkPaned       *paned);
 static gboolean gtk_hpaned_button_press   (GtkWidget      *widget,
                                           GdkEventButton *event);
@@ -40,6 +42,8 @@ static gboolean gtk_hpaned_button_release (GtkWidget      *widget,
 static gboolean gtk_hpaned_motion         (GtkWidget      *widget,
                                           GdkEventMotion *event);
 
+static gpointer parent_class;
+
 GtkType
 gtk_hpaned_get_type (void)
 {
@@ -70,10 +74,13 @@ gtk_hpaned_class_init (GtkHPanedClass *class)
 {
   GtkWidgetClass *widget_class;
 
+  parent_class = gtk_type_class (GTK_TYPE_PANED);
+  
   widget_class = (GtkWidgetClass *) class;
 
   widget_class->size_request = gtk_hpaned_size_request;
   widget_class->size_allocate = gtk_hpaned_size_allocate;
+  widget_class->expose_event = gtk_hpaned_expose;
   widget_class->button_press_event = gtk_hpaned_button_press;
   widget_class->button_release_event = gtk_hpaned_button_release;
   widget_class->motion_notify_event = gtk_hpaned_motion;
@@ -221,6 +228,48 @@ gtk_hpaned_size_allocate (GtkWidget     *widget,
     }
 }
 
+static gint
+gtk_hpaned_expose (GtkWidget      *widget,
+                   GdkEventExpose *event)
+{
+  GtkPaned *paned;
+  guint16 border_width;
+
+  g_return_val_if_fail (widget != NULL, FALSE);
+  g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
+
+  if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget)) 
+    {
+      paned = GTK_PANED (widget);
+      border_width = GTK_CONTAINER (paned)->border_width;
+
+      if (event->window == widget->window)
+        {
+          gdk_window_clear_area (widget->window,
+                                 event->area.x, event->area.y,
+                                 event->area.width,
+                                 event->area.height);
+
+          /* Chain up to draw children */
+          GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+        }
+      else if (event->window == paned->handle)
+        {
+         gtk_paint_handle (widget->style,
+                           paned->handle,
+                           GTK_STATE_NORMAL,
+                           GTK_SHADOW_NONE,
+                            &event->area,
+                           widget,
+                           "paned",
+                           0, 0, -1, -1,
+                           GTK_ORIENTATION_VERTICAL);
+       }
+    }
+
+  return FALSE;
+}
+
 static void
 gtk_hpaned_xor_line (GtkPaned *paned)
 {
index 87010ec8b2495154adf1ca4de90a2de504378aa7..73f5a352910f393851e3fa92c7f05ffbd71ef5e0 100644 (file)
@@ -2340,8 +2340,22 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
                           page->tab_label->allocation.width + 1,
                           page->tab_label->allocation.height + 1);
        }
-      if (gtk_widget_intersect (page->tab_label, area, &child_area))
-       gtk_widget_draw (page->tab_label, &child_area);
+      if (gtk_widget_intersect (page->tab_label, area, &child_area) &&
+          GTK_WIDGET_DRAWABLE (page->tab_label))
+        {
+          GdkEventExpose expose_event;
+
+          /* This is a lame hack since all this code needs rewriting anyhow */
+          
+          expose_event.window = page->tab_label->window;
+          expose_event.area = child_area;
+          expose_event.send_event = TRUE;
+          expose_event.type = GDK_EXPOSE;
+          expose_event.count = 0;
+          
+          gtk_widget_event (page->tab_label,
+                            (GdkEvent*)&expose_event);
+        }
     }
 }
 
index 87cecc3dd05a11f38d60ec38cb3e5eb1f19ddbdb..483084702b5b0873ff8c692e41b739663cd0a7e7 100644 (file)
@@ -295,6 +295,8 @@ gtk_paned_unrealize (GtkWidget *widget)
     (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
 }
 
+
+
 static gint
 gtk_paned_expose (GtkWidget      *widget,
                  GdkEventExpose *event)
@@ -310,16 +312,10 @@ gtk_paned_expose (GtkWidget      *widget,
     {
       paned = GTK_PANED (widget);
 
-      if (event->window == paned->handle)
-       {
-         child_event = *event;
-         event->area.x += paned->handle_xpos;
-         event->area.y += paned->handle_ypos;
-         gtk_widget_draw (widget, &event->area);
-       }
-      else
+      if (event->window != paned->handle)
        {
          child_event = *event;
+
          if (paned->child1 &&
              GTK_WIDGET_NO_WINDOW (paned->child1) &&
              gtk_widget_intersect (paned->child1, &event->area, &child_event.area))
index 287b5d15f3cda514851e4a17a9ac6a88bf1037a7..686d170106520d263246e65a485eae0d872ab8a4 100644 (file)
@@ -924,12 +924,15 @@ gtk_text_btree_insert (GtkTextIter *iter,
                                 * added to this line). */
   GtkTextLineSegment *seg;
   GtkTextLine *newline;
-  int chunkSize;                        /* # characters in current chunk. */
-  guint sol; /* start of line */
-  guint eol;                      /* Pointer to character just after last
-                                   * one in current chunk. */
+  int chunk_len;                        /* # characters in current chunk. */
+  gint sol;                           /* start of line */
+  gint eol;                           /* Pointer to character just after last
+                                       * one in current chunk.
+                                       */
+  gint delim;                          /* index of paragraph delimiter */
   int line_count_delta;                /* Counts change to total number of
-                                        * lines in file. */
+                                        * lines in file.
+                                        */
 
   int char_count_delta;                /* change to number of chars */
   GtkTextBTree *tree;
@@ -968,17 +971,14 @@ gtk_text_btree_insert (GtkTextIter *iter,
   char_count_delta = 0;
   while (eol < len)
     {
-      for (; eol < len; eol++)
-        {
-          if (text[eol] == '\n')
-            {
-              eol++;
-              break;
-            }
-        }
-      chunkSize = eol - sol;
+      pango_find_paragraph_boundary (text + sol,
+                                     len - sol,
+                                     &delim,
+                                     &eol);      
 
-      seg = _gtk_char_segment_new (&text[sol], chunkSize);
+      chunk_len = eol - sol;
+
+      seg = _gtk_char_segment_new (&text[sol], chunk_len);
 
       char_count_delta += seg->char_count;
 
@@ -993,10 +993,9 @@ gtk_text_btree_insert (GtkTextIter *iter,
           cur_seg->next = seg;
         }
 
-      if (text[eol-1] != '\n')
-        {
-          break;
-        }
+      if (delim == eol)
+        /* chunk didn't end with a paragraph separator */
+        break;
 
       /*
        * The chunk ended with a newline, so create a new GtkTextLine
@@ -6703,7 +6702,7 @@ gtk_text_btree_spew_line_short (GtkTextLine *line, int indent)
           s = str;
           while (*s)
             {
-              if (*s == '\n')
+              if (*s == '\n' || *s == '\r')
                 *s = '\\';
               ++s;
             }
index d73e0a8589d1af86c58b17b8cb70fc7e6cb6e6c8..fae5b5dc63aaad28a58da52c5cd09149b666c101 100644 (file)
@@ -1326,18 +1326,49 @@ gtk_text_iter_starts_line (const GtkTextIter   *iter)
  * gtk_text_iter_ends_line:
  * @iter: an iterator
  *
- * Returns TRUE if @iter points to a newline character.
+ * Returns TRUE if @iter points to the start of the paragraph delimiter
+ * characters for a line (delimiters will be either a newline, a
+ * carriage return, a carriage return followed by a newline, or a
+ * Unicode paragraph separator character). Note that an iterator pointing
+ * to the \n of a \r\n pair will not be counted as the end of a line,
+ * the line ends before the \r.
  *
  * Return value: whether @iter is at the end of a line
  **/
 gboolean
 gtk_text_iter_ends_line (const GtkTextIter   *iter)
 {
+  GtkTextRealIter *real;
+  gunichar wc;
+  
   g_return_val_if_fail (iter != NULL, FALSE);
 
+  real = gtk_text_iter_make_real (iter);
+  
   check_invariants (iter);
 
-  return gtk_text_iter_get_char (iter) == '\n';
+  /* Only one character has type G_UNICODE_PARAGRAPH_SEPARATOR in
+   * Unicode 3.0; update this if that changes.
+   */
+#define PARAGRAPH_SEPARATOR 0x2029
+
+  wc = gtk_text_iter_get_char (iter);
+  
+  if (wc == '\r' || wc == PARAGRAPH_SEPARATOR)
+    return TRUE;
+  else if (wc == '\n')
+    {
+      /* need to determine if a \r precedes the \n, in which case
+       * we aren't the end of the line
+       */
+      GtkTextIter tmp = *iter;
+      if (!gtk_text_iter_prev_char (&tmp))
+        return FALSE;
+
+      return gtk_text_iter_get_char (&tmp) != '\r';
+    }
+  else
+    return FALSE;
 }
 
 /**
index 69bfed62d9913947b6f6adb5713301ac4606bae9..5347372fa375db9b5a11e16b3e15d6d4a0b30934 100644 (file)
@@ -32,6 +32,8 @@ static void     gtk_vpaned_size_request   (GtkWidget      *widget,
                                           GtkRequisition *requisition);
 static void     gtk_vpaned_size_allocate  (GtkWidget      *widget,
                                           GtkAllocation  *allocation);
+static gint     gtk_vpaned_expose         (GtkWidget      *widget,
+                                           GdkEventExpose *expose);
 static void     gtk_vpaned_xor_line       (GtkPaned       *paned);
 static gboolean gtk_vpaned_button_press   (GtkWidget      *widget,
                                           GdkEventButton *event);
@@ -40,6 +42,8 @@ static gboolean gtk_vpaned_button_release (GtkWidget      *widget,
 static gboolean gtk_vpaned_motion         (GtkWidget      *widget,
                                           GdkEventMotion *event);
 
+static gpointer parent_class;
+
 GtkType
 gtk_vpaned_get_type (void)
 {
@@ -70,10 +74,13 @@ gtk_vpaned_class_init (GtkVPanedClass *class)
 {
   GtkWidgetClass *widget_class;
 
+  parent_class = gtk_type_class (GTK_TYPE_PANED);
+  
   widget_class = (GtkWidgetClass *) class;
 
   widget_class->size_request = gtk_vpaned_size_request;
   widget_class->size_allocate = gtk_vpaned_size_allocate;
+  widget_class->expose_event = gtk_vpaned_expose;
   widget_class->button_press_event = gtk_vpaned_button_press;
   widget_class->button_release_event = gtk_vpaned_button_release;
   widget_class->motion_notify_event = gtk_vpaned_motion;
@@ -221,6 +228,50 @@ gtk_vpaned_size_allocate (GtkWidget     *widget,
     }
 }
 
+static gint
+gtk_vpaned_expose (GtkWidget      *widget,
+                   GdkEventExpose *event)
+{
+  GtkPaned *paned;
+  guint16 border_width;
+
+  g_return_val_if_fail (widget != NULL, FALSE);
+  g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
+
+  if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
+    {
+      paned = GTK_PANED (widget);
+      border_width = GTK_CONTAINER (paned)->border_width;
+
+      if (event->window == widget->window)
+        {
+          gdk_window_clear_area (widget->window,
+                                 event->area.x, event->area.y,
+                                 event->area.width,
+                                 event->area.height);
+
+
+          /* Chain up to draw children */
+          GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+        }
+      else if (event->window == paned->handle)
+        {
+         gtk_paint_handle (widget->style,
+                           paned->handle,
+                           GTK_STATE_NORMAL,
+                           GTK_SHADOW_NONE,
+                            &event->area,
+                           widget,
+                           "paned",
+                           0, 0, -1, -1,
+                           GTK_ORIENTATION_HORIZONTAL);
+
+       }
+    }
+
+  return FALSE;
+}
+
 static void
 gtk_vpaned_xor_line (GtkPaned *paned)
 {